<?php
/**
 * Created by PhpStorm.
 * User: zhan
 * Date: 2018/10/19  15:07
 */
namespace app\pc\logic;
use app\pc\BaseModel;

class Guide extends  BaseModel
{

    //检测参数是否已传
    protected $ParameterDetection = [
    ];

    /**
     * 贷款帮助
     */
    public function index()
    {
        $nid = $this->articleNew->get_nav_id('贷款帮助');
        $nav = $this->articleNew->get_nav_category($nid,0);
        $list = db('article')->where(['cid'=>$nav[0]['id']])->select();

        $result['list'] = $list;
        $result['nav'] = $nav;
        return $result;
    }

    //关于我们侧边栏
    public function nav()
    {
        $item = db('article_category')->where('nav_id=4 and pid=0')->find();
        $item['url'] = __ROOT__.'/Guide/index.html';
        return $item;
    }

}
